<?php
namespace common\models;

use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;

/**
 * 交易操作表
 * @author WJ
 */
class AROperation extends ActiveRecord
{
    const STATUS_BEGIN_TRAN = 1;    //发起交易
    const STATUS_ACCEPT_TRAN = 2;   //同意交易
    const STATUS_CHOOSE_BROKER = 3; //选择了委托经纪人
    const STATUS_ACCEPT_ENTRUST = 4;    //同意委托
    const STATUS_PLAY_MONEY = 5;    //确认打款
    const STATUS_GET_MONEY = 6; //确认收款
    const STATUS_GET_COIN = 7;  //确认收币
    const STATUS_FREEZE = 8;    //要求客服介入,交易冻结

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%operation}}';
    }
    
    
    public function behaviors()
    {
        return [
            TimestampBehavior::className(),
        ];
    }

}
